The invention relates to computer display systems and methods involving display memories, the contents of which are displayed on a display screen.
CRT (cathode ray tubes) display units are commonly used in computer systems. A display system typically includes a random access display memory that is addressable by both a computer and display address generating circuitry that automatically accesses sequential locations of the display memory at a sufficiently high rate to cause continuous CRT display of the present contents of the display memory. The display address generating circuitry is part of a larger circuit that also generates timing and control signals that synchronize the operation of the CRT, the display memory, and the computer. Numerous implementations of the above-described display system are commonly used, and can be readily implemented by those skilled in the art. The display software of such systems is frequently designed so that the main program and the display subroutine cooperate to select a new pattern to be displayed and "write" the new pattern (which is stored in a read only memory in the form of a pixel code for each pixel in a rectangular pattern area) on an already displayed pattern which is presently stored in the display memory.
The operation includes selection by the main program of both the new pattern to be displayed and the location of the CRT screen on which that new pattern is to be displayed. The display subroutine then uses this information to cause the computer to fetch a data word of the selected new pattern from the read only memory. Typically, at least several pixel codes will be contained in each such pattern data word. For example, if the pixel code is four bits long, and the computer normally operates upon sixteen bit data words, there will be four pixels in each pattern data word. It is necessary for the display subroutine to then examine each pixel, one at a time, to determine if that pixel is "transparent" or if it has a particular darkness or color.
A "transparent" pixel is one which has no color. Therefore, the color of the presently displayed background pattern is not to be changed when the selected new pattern is written into the display memory and then displayed on the CRT, as explained above. In other words, the background pattern "shines" through any "holes" in the new pattern that is displayed on the CRT. To accomplish this, the display subroutine must write the subject pixel code into the display memory if that pixel is not transparent. If that pixel is transparent, the computer must make a decision not to write the corresponding pixel code into the display memory.
In order to examine a particular pixel code in a pattern data word, the display subroutine must save the rest of that pattern data word, and then "mask" out (i.e., set to "zeros") the rest of that pattern data word, and then shift that pixel code, for example, to "right register" it. Only then can the display subroutine make the necessary check to determine if the subject pixel code indicates whether the subject pixel is transparent or is to be written into the presently addressed pixel code location of the display memory. Furthermore, in order to write a single four bit pixel code into a display memory location that contains many more bits than the pixel code, it is necessary that the display subroutine first fetch the word in that display memory location, mask out the four bits wherein the subject pixel code is to be written, and store the masked word. The subject pixel code (if it is not transparent) must be shifted to a location in a word that is otherwise masked, and exclusively ORed with the stored masked word. The resulting word is then written into the presently addressed location of the display memory.
Obviously, if the computer data word is the same length as the pixel code, no such shifting and masking operations are necessary, but a typical pixel code is only four bits (e.g., to specify one of sixteen colors, including transparent). Efficient state of the art computers usually have much wider data words, typically from eight to sixty or more bits in a data word. In such computers, the above-described prior methods of effecting display of patterns are less efficient than is desirable. Therefore, there is an unmet need for improved computer apparatus and methods for more efficiently displaying data on a screen.
Accordingly, it is an object of the invention to provide an improved apparatus and method for efficiently displaying data on a display unit.
It is another object of the invention to provide a display apparatus and method that reduce the number of computer operations necessary to display data for a computer system having data words that are longer than the pixel codes used.
It is another object of the invention to provide an improved display apparatus and method that avoid the need to read the display memory before writing a relatively narrow pixel code into a relatively wide data word location in the display memory.